From: Lukáš Tyrychtr Date: Tue, 5 Aug 2025 12:44:55 +0000 (+0200) Subject: quickSettings: Allow setting accessible names for quick toggle menu buttons X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~104^2^2~79 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8f39c75d1d6dc73d0adb60dcd505e0a4db304664;p=gnome-shell.git quickSettings: Allow setting accessible names for quick toggle menu buttons This allows to override the menu button's label. This API will be used in the next commit. Part-of: --- diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index 921537463..051294848 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -158,6 +158,10 @@ export const QuickMenuToggle = GObject.registerClass({ 'menu-enabled', null, null, GObject.ParamFlags.READWRITE, true), + 'menu-button-accessible-name': GObject.ParamSpec.string( + 'menu-button-accessible-name', null, null, + GObject.ParamFlags.READWRITE, + _('Open menu')), }, }, class QuickMenuToggle extends QuickSettingsItem { _init(params) { @@ -182,7 +186,6 @@ export const QuickMenuToggle = GObject.registerClass({ this._menuButton = new St.Button({ style_class: 'quick-toggle-menu-button icon-button', child: new St.Icon({icon_name: 'go-next-symbolic'}), - accessible_name: _('Open menu'), can_focus: true, x_expand: false, y_expand: true, @@ -216,6 +219,9 @@ export const QuickMenuToggle = GObject.registerClass({ this.bind_property('menu-enabled', this._menuButton, 'visible', GObject.BindingFlags.SYNC_CREATE); + this.bind_property('menu-button-accessible-name', + this._menuButton, 'accessible-name', + GObject.BindingFlags.SYNC_CREATE); this.bind_property('reactive', this._menuButton, 'reactive', GObject.BindingFlags.SYNC_CREATE);